﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PresentationLayerMVC.Models.BookingViewModels>" %>
    <table>
        <tr>
            <th>
                ID
            </th>
            <th>
                FirstName
            </th>
            <th>
                LastName
            </th>
           
        </tr>
      
        <% 
            for (int i = 0; i < Model.guests.Count(); i++) { %>
            
            <tr>
            <td>
                 <%: i+1 %>
                 <%: Html.HiddenFor(model =>  Model.guests[i].ID)%>
            </td>
            <td>
               <%: Html.EditorFor(model => Model.guests[i].FirstName)%>
            </td>
            <td>
                <%: Html.EditorFor(model => Model.guests[i].LastName)%>
            </td>

            </tr>
                

            <% } %>

            <tr>
		<td colspan="1" style="width: 163px"> 
        <% if (Session["isBookingUpdateable"] != null)
           {
               if (Session["isBookingUpdateable"].ToString().Equals("True"))
               {
                   %>
                    <input type="submit" value="Save" />
                   <%
               }
           }
             %></td>
		<td colspan="2">   <span id="result"></span> </td>
	</tr>
 </table>